package com.example.lenovo.test01;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.lenovo.test01.listview.ListViewActivity;

public class MainActivity extends AppCompatActivity {

    private Button btn1;
    private Button btn2;
    private Button btn3;
    private Button btn4;
    private Button btn5;
    private Button btn_listview;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        btn1=findViewById(R.id.button1);
        btn1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC1界面
                Intent intent = new Intent(MainActivity.this,UC1.class);
                startActivity(intent);

            }
        });
        btn2=findViewById(R.id.button2);
        btn2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC2界面
                Intent intent = new Intent(MainActivity.this,UC2.class);
                startActivity(intent);

            }
        });
        btn3=findViewById(R.id.button3);
        btn3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC3界面
                Intent intent = new Intent(MainActivity.this,UC3.class);
                startActivity(intent);

            }
        });
        btn4=findViewById(R.id.button4);
        btn4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到UC4界面
                Intent intent = new Intent(MainActivity.this,UC4.class);
                startActivity(intent);
            }
        });
        btn5=findViewById(R.id.button5);
        btn5.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到U5界面
                Intent intent = new Intent(MainActivity.this,UC5.class);
                startActivity(intent);
            }
        });
        btn_listview=findViewById(R.id.btn_listview);
        btn_listview.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转到U5界面
                Intent intent = new Intent(MainActivity.this,ListViewActivity.class);
                startActivity(intent);
            }
        });
    }
}
